namespace MiniFlower
{
    public abstract class ProcessNodeBase : IProcessNode
    {
        protected IProcessEventListener m_Listener;
        protected EProcessStatus m_Status;

        public ProcessNodeBase()
        {
            
        }

        public void SetProcessEventListener(IProcessEventListener listener)
        {
            m_Listener = listener;
        }

        public abstract void OnEnter();

        public abstract void Execute(float dt);

        public virtual void OnExit()
        {
            m_Listener = null;
        }

        public virtual EProcessStatus GetProcessStatus() =>m_Status;
    }
}
